@use '@angular/material/core/tokens/token-utils';
@use '@angular/material/core/style/sass-utils';

// The prefix used to generate the fully qualified name for tokens in this file.
$prefix: (ngm, indicator-app);

$border-bottom-color: #23282a;
$searching-transition: all 300ms;


@function get-unthemable-tokens() {
  @return (
  );
}

@function get-color-tokens() {
  @return (
    sidenav-background-color: var(--ngm-color-surface-container),
  );
}

@function get-token-slots() {
  @return sass-utils.deep-merge-all(
    get-unthemable-tokens(),
    get-color-tokens(),
  );
}

:host {
  @include token-utils.create-token-values($prefix, get-token-slots());

  flex: 1;
  max-width: 100%;
  display: flex;
  flex-direction: row;
  overflow: hidden;

  &.searching {
    .pac-indicator-market_-toolbar {
      height: 0;
      transform: translateY(-50%);
    }

    .pac-indicator-market__search-input {
      margin-right: 0;
    }

    .pac-indicator-market__search-done {
      opacity: 1;
      width: 64px;
      transform: translateX(0);
    }
  }
}

.pac-indicator-market_-toolbar {
  transition: $searching-transition;
  height: 40px;
  overflow: hidden;
}

.pac-indicator-market__search-input {
  transition: $searching-transition;
  margin-left: 0.75rem;
  margin-right: 0.75rem;
}

.pac-indicator-market__search-done {
  transition: $searching-transition;
  opacity: 0;
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  transform: translateX(50%);
}

.pac-indicator-market__drawer {
  .pac-indicator-market__empty {
    position: absolute;
    top: 50%;
    margin: -50px auto auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  
    .signal {
      font-size: 3rem;
      line-height: 4rem;
    }
  }
  
}

.pac-indicator-detail {
  overflow: hidden;
}

.pac-indicator-market__searchbar {
  position: absolute;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  display: none;
}

.pac-indicator-market__infinite-container {
  flex: 1;
}

.mat-datepicker-input.pac-indicator-market__date-picker {
  border: unset;
}

.pac-indicator-app__options {
  background-color: var(--ngm-card-bg-color);
  padding: 1rem;
}

.pac-indicator-list {
  .mat-divider.mat-divider-horizontal {
    @apply mx-2 border-black/5 dark:border-white/5;
  }

  .mat-mdc-list-item {
    @apply select-none hover:bg-black/5 dark:hover:bg-white/10;

    &.selected {
      @apply bg-black/5 dark:bg-white/10
    }
  }
}

.cdk-drag-animating {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}
.pac-indicator__placeholder {
  border: dotted 3px var(--ngm-color-outline);
  min-height: 70px;
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
  @apply rounded-xl;
}
.cdk-drag-preview {
  background-color: var(--ngm-color-surface-container);
}
.pac-indicator-list.cdk-drop-list-dragging .mat-mdc-list-item:not(.cdk-drag-placeholder) {
  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}